package com.example.module_web.adapter;

import com.example.module_web.R;
import com.example.module_web.beans.Product;
import com.example.module_web.viewholder.BindViewHolder;

import java.util.List;

/**
 * Created by ASUS on 2018/3/17.
 */

public class Product2Adapter extends FormBAdapter<Product> {

    public Product2Adapter(int layoutRes, List<Product> beans) {
        super(layoutRes, beans);
    }

    @Override
    protected void onBind(BindViewHolder holder, int position, Product product) {
        holder.setText(R.id.item_form_num,String.valueOf(product.getNumber()))
                .setText(R.id.item_form_product,product.getProduct())
                .setText(R.id.item_form_retailprice,String.valueOf(product.getRetailPrice()))
                .setText(R.id.item_form_invertory,String.valueOf(product.getInventory()))
                .setText(R.id.item_form_saleprice,String.valueOf(product.getSalePrice()))
                .setText(R.id.item_form_active,product.getActivite())
                .setText(R.id.item_form_specification,String.valueOf(product.getSpecification()));
    }
}
